package com.dong.deliveryman.dao;

import com.dong.deliveryman.enums.DeliverymanStatus;
import com.dong.deliveryman.po.DeliverymanPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DeliverymanDao {
    @Select("select id,name, status, date from deliveryman where id= #{id}")
    DeliverymanPO selectById(Integer id);

    @Select("SELECT id,name, status, date from deliveryman WHERE status= #{status}")
    List<DeliverymanPO> selectDeliverymanByStatus(DeliverymanStatus status);
}
